package com.smm.web.vmc.dao;

import org.hibernate.criterion.DetachedCriteria;
import org.springframework.orm.hibernate5.HibernateTemplate;

import java.io.Serializable;
import java.util.List;

/**
 * Created by zhenghao on 2016/7/29.
 *
 */
public interface BaseDao<T> {

    List<T> getAll(Class<T> clazz);

    T getOne(Class<T> clazz, Serializable id);


    void update(T object);


    void delete(T object);


    void add(T object);


    List<T> query(DetachedCriteria where);

    HibernateTemplate getTemplate();


    List<Object []> createSqlQuery(String sql);


}
